projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f65042
)
Fix position in empty buffers in checkdoc-file-comments-engine
author
Lars Ingebrigtsen
<larsi@gnus.org>
Fri, 29 Jan 2021 06:04:43 +0000
(07:04 +0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Fri, 29 Jan 2021 06:04:47 +0000
(07:04 +0100)
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't give invalid positions on empty buffers (bug#39987).
lisp/emacs-lisp/checkdoc.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/checkdoc.el
b/lisp/emacs-lisp/checkdoc.el
index 76638ec13b1a0c2ac431cffcb91b966ecd830b24..9722792a5a501fafc4487bddade860838ab1b392 100644
(file)
--- a/
lisp/emacs-lisp/checkdoc.el
+++ b/
lisp/emacs-lisp/checkdoc.el
@@
-2362,7
+2362,9
@@
Code:, and others referenced in the style guide."
(checkdoc-create-error
(format "The footer should be: (provide '%s)\\n;;; %s%s ends here"
fn fn fe)
- (1- (point-max)) (point-max)))))
+ ;; The buffer may be empty.
+ (max (point-min) (1- (point-max)))
+ (point-max)))))
err))
;; The below checks will not return errors if the user says NO